package com.qf.mapper;

import com.qf.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * Mapper | Dao
 * @author lixu
 */
public interface UserMapper {



    //查询所有数据  简单操作
    @Select("select * from user ")
    public List<User> findAll();

    //添加
    @Insert("insert into user (username,password) value (#{username},#{password})")
    void insertUser(User user);

    //修改
    @Update("update user set username = #{username},password = #{password} where uid = #{uid}")
    void updateUserById(User user);
}
